package fragment;

import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.example.zx.theline.R;
import com.loopj.android.http.RequestParams;

import org.apache.http.Header;

import GsonBean.CheckInfoBean;
import GsonBean.CheckPlanBean;
import base.BaseFragment;
import network.NetWork;
import network.ObjectHttpResponseHandler;


public class CustodyFragment extends BaseFragment {

    int CustodyOffset = 1;
    int CustodyLimit = 20;

    public CustodyFragment() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_custody, container, false);
        return view;
    }

    @Override
    protected void InitData() {

    }

    @Override
    protected void InitListen() {

    }

    public void getCheckListData(String bh) {
        RequestParams params = new RequestParams();
        params.add("bh", String.valueOf(bh));
        NetWork.get("list", params, new ObjectHttpResponseHandler(getContext(), CheckInfoBean.class) {
            @Override
            public void Success(int i, Header[] headers, Object object) {
                 CheckInfoBean mCheckInfoBean=(CheckInfoBean) object;
                Log.v("mCheckInfoBean",""+mCheckInfoBean+"");

            }
            @Override
            public void Failure(int i, Header[] headers, String s, Throwable throwable) {

            }
        });

    }

    public class CustodyAdapter extends BaseAdapter{
        @Override
        public int getCount() {
            return 0;
        }

        @Override
        public Object getItem(int position) {
            return null;
        }

        @Override
        public long getItemId(int position) {
            return 0;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            convertView=View.inflate(getContext(),R.layout.custodylist_adapter,null);
            return convertView;
        }
    }
}
